package com.xgst.smallscreen.http

import com.blankj.utilcode.util.AppUtils
import com.gym.baselib.utils.CacheUtils
import com.hjq.http.config.IRequestServer
import com.ht.medicaltreatment.base.CacheKey

class RequestServer : IRequestServer {
    override fun getHost(): String {
        val ip = CacheUtils.getStringCache(CacheKey.IP, "192.168.2.6")
        val port = CacheUtils.getStringCache(CacheKey.PORT, "8080")
        var url = "http://${ip}:$port/sample"
        if (AppUtils.isAppDebug()){
            url = "http://656c75a0.r23.cpolar.top/sample"
        }
        return url
    }
}